local noice = require("noice")
noice.setup({
  cmdline = {
    enabled = true,
    format = {
      cmdline = {
        pattern = "^:",
        icon = "",
        lang = "vim",
      },
      search_down = {
        kind = "search",
        pattern = "^/",
        icon = " ",
        lang = "regex",
        -- view = "popup"
      },
      search_up = {
        kind = "search",
        pattern = "^%?",
        icon = " ",
        lang = "regex",
        -- view = "popup",
        -- view = "split", -- 分屏
        -- view = "hover" -- 当前位置
      },
      filter = {
        pattern = "^:%s*!",
        icon = "$",
        lang = "bash",
      },
      lua = {
        pattern = {
          "^:%s*lua%s+",
          "^:%s*lua%s*=%s*",
          "^:%s*=%s*",
        },
        icon = "",
        lang = "lua",
      },
      help = {
        pattern = "^:%s*he?l?p?%s+",
        icon = "",
      },
    },
  },
  views = {
    cmdline_popup = {
      position = {
        row = "100%",
        col = "30%",
      },
      size = {
        -- width = "25%",
        width = 39,
        height = 1,
      },
      border = {
        style = "none",
        padding = { 0, 0 },
      },
      filter_options = {},
      -- win_options = {
      --   winhighlight = "NormalFloat:Statusline,FloatBorder:FloatBorder",
      -- },
    },
    -- popupmenu = {
    --   relative = "editor",
    --   position = {
    --     row = "97%",
    --     col = "50%",
    --   },
    --   size = {
    --     width = "40%",
    --     height = 5,
    --   },
    --   border = {
    --     style = "rounded",
    --     padding = { 0, 1 },
    --   },
    --   win_options = {
    --     winhighlight = { Normal = "Normal", FloatBorder = "DiagnosticInfo" },
    --   },
    -- },
  },
  -- presets = {
  --   bottom_search = false,
  --   command_palette = true,
  --   long_message_to_split = true,
  --   inc_rename = false,
  --   lsp_doc_border = false,
  -- },
})
